package code18_design.proxy;

import code18_design.factory.ObjectFactory;

public class Test01 {

	public static void main(String[] args) {
		
		// UserService userService = new UserServiceImpl();
		// 使用代理
		// UserService userService = new UserServiceProxy();
		
		// 一般会和工厂配合使用, 降低类与类之间的耦合度
		UserService userService = ObjectFactory.getObj("userService");
		
		userService.login("tom", "123");
		
	}
	
}
